package com.jaydenxiao.common.basebean;

import com.jaydenxiao.common.R;
import com.jaydenxiao.common.base.IBaseMulInterface;

/**
 * Created by hasee on 2017/10/16.
 */

public class TitleBean implements IBaseMulInterface {

    public static final int HOME_ITEM_EDIT=1;
    private String title;
    private int layoutType;

    public TitleBean(String title) {
        this.title = title;
    }

    public String getTitle() {
        if (title == null)
            title = "";
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public TitleBean(String title, int layoutType) {
        this.title = title;
        this.layoutType = layoutType;
    }

    @Override
    public int getItemLayoutId() {
        int layoutId=0;
        switch (layoutType){
            case HOME_ITEM_EDIT:
                layoutId= R.layout.item_title;
                break;
            default:
                layoutId=R.layout.item_title;
                break;
        }
        return layoutId;
    }


}
